@import 'fonts';
@import 'mixins';

#battlesettings {
	@include borderbox();
	float: left;
	margin: 0px;
	width: 250px;
	background: $light_bg2;
	padding: $module_spacing;
	border-radius: $module_radius;
}

#critterbox {
	@include borderbox();
	float: left;
	list-style: none;
	margin: 0px;
	padding: 0px 16px;
	width: unquote("calc(100% - 250px)");

	ul#critterlist {
		@include borderbox();
		@include unselectable();
		float: left;
		list-style: none;
		margin: 0px;
		padding: 0px;
		width: 35%;

		&>span { // "no critters selected"
			
		}

		li {
			background: $light_bg3;
			border-bottom: 1px dashed $accent3;
			padding: 4px 16px;

			&:hover {
				background: darken($light_bg3, 5%);
			}

			&:last-of-type {
				border-bottom: none;
			}

			.ownername {
				font-size: 0.8em;
				padding-left: 10px;

				&:after {
					content: ")";
				} // this comment is here so sublime's reindenter works
				
				&:before {
					content: "(";
				}
			}

			.crittername {
				// color: blue;
			}

			.remove {
				color: #DD0000;
				cursor: pointer;
				float: right;
				text-decoration: none;

				&:hover {
					text-decoration: underline;
				}
			}
		}
	}

	#critterselection {
		@include borderbox();
		float: left;
		margin: 0px;
		min-width: 300px;
		padding-right: $module_spacing;
		width: 65%;

		#tabbuttonbar {
			background: $light_bg2;

			.tabbutton {
				@include unselectable();
				background: none;
				color: $accent1;
				cursor: pointer;
				float:left;
				font-size: 13px;
				margin: 0px;

				padding: {
					top: 2px;
					bottom: 2px;
					left: 8px;
					right: 8px;
				}


				&.active {
					cursor: default;
					background: $light_bg3;

					&:hover {
						color: $accent1;
					}
				}
				&:hover {
					color: #EEE;
				}
			}
		}
		.tablebox {
			background: $light_bg3;
			border: 1px solid $accent2;
			display: block;
			max-height: 400px;
			overflow-y: auto;	
			width: 100%;

			&::-webkit-scrollbar {
				width: 12px;
			}
			&::-webkit-scrollbar-track {
				background: $light_bg;
			}
			&::-webkit-scrollbar-thumb {
				background: $light_bg2;
			}

			// heading
			div:first-child {
				border-bottom: 1px solid $accent2;
				font-weight: bold;
				overflow: hidden;
				padding: 4px;

				span {
					display: block;
					float: left;
					width: 32%;
				}
			}

			// content box
			ul {
				list-style: none;
				margin: 0px;
				max-height: 400px;
				overflow: auto;
				padding: 0px;
				width: 100%;

				li {
					@include unselectable();
					cursor: pointer;
					display: block;
					margin: 0px;
					overflow: hidden;
					padding: 4px;
					width: 100%;

					&:hover {
						background: mix($light_bg3, yellow, 90%);
					}

					&.selected {
						background: mix($light_bg3, blue, 92%);
						&:hover {
							// background: darken(mix($light_bg3, blue, 92%), 3%);
						}
					}

					&:nth-child(even) {
						background: darken($light_bg3, 5%);
						&:hover {
							background: mix(darken($light_bg3, 5%), yellow, 90%);
						}
						&.selected {
							background: mix(darken($light_bg3, 3%), blue, 92%);
							&:hover {
								// background: darken(mix($light_bg3, blue, 92%), 5%);
							}
						}
					}


					span {
						display: block;
						float: left;
						width: 32%;
					}
				}
			}

			table {
				@include unselectable();
				background: $light_bg3;
				border: 1px solid $accent2;
				max-height: 200px;
				width: 100%;

				th {
					font-weight: bold;
					padding: 2px;
					text-align: left;

					tr {
					}
				}
				tr {
					border: none;
					margin: 0px;
					padding: 0px;
					&:hover {
						background: darken($light_bg3, 5%);
					}
				}
				td {
					padding: 2px;
					margin: 0px;
				}

				thead {
					tr {
						border-bottom: 1px solid $accent2;
						background: $light_bg;
						&:hover {
							background: $light_bg;
						}
					}

				}

				tbody {

				}
			}
		}
	}
}



#createbutton {
	border-radius: 16px;
	background: $light_bg2;
	clear: both;
	cursor: pointer;
	display: block;
	margin: auto;
	padding: 10px 0px;
	text-align: center;
	text-decoration: underline;
	width: 200px;

	font: {
		family: $font_toolbar;
		size: 1.5em;
	}
	&:hover {
		background: darken($light_bg2, 5%);
	}
	&.disabled {
		cursor: default;
		text-decoration: none;
		background: lighten($light_bg2, 5%);
		color: $accent2;
		&:hover {
			background: lighten($light_bg2, 5%);
		}
	}
}

